package voidgame.core;
import java.awt.Color;
import java.awt.Font;
import java.awt.Graphics;
import java.awt.Graphics2D;

import javax.swing.ImageIcon;
import javax.swing.JPanel;

public class ControlPanel extends JPanel{
	
	Game game;
	
	public ControlPanel(Game g){
		
		game=g;
		
		this.setBackground(Color.BLACK);
		this.setForeground(Color.GREEN);
		
	}
	
	public void paint(Graphics g) {
		
		super.paint(g);
		
        Graphics2D g2d = (Graphics2D) g;
        
        Font font = new Font("Lucida Console", Font.PLAIN, 14);
        g2d.setFont(font);

        g2d.drawString("CONTROL PANEL", 20, 20);
        
        g2d.setColor(Color.BLUE);
        g2d.drawString("TURN:", 20, 265);
        g2d.setColor(Color.GREEN);
        g2d.drawString(""+game.turn, 120, 265);
        g2d.setColor(Color.BLUE);
        g2d.drawString("MOVE POINTS:", 20, 280);
        g2d.setColor(Color.GREEN);
        g2d.drawString(""+game.player.movePoints, 120, 280);
        g2d.setColor(Color.BLUE);
        g2d.drawString("SHIP STATUS:", 20, 295);
        g2d.setColor(Color.GREEN);
        g2d.drawString(""+game.player.ship.status, 120, 295);
        
        switch(game.gameMode){
        	case Game.GAMEMODENAVIGATE:{
        		g2d.setColor(Color.RED);
        		g2d.drawString("Arrows:", 20, 40);
        		g2d.setColor(Color.GREEN);
        		g2d.drawString("Move", 100, 40);
        		
        		g2d.setColor(Color.RED);
        		g2d.drawString("I:", 20, 55);
        		g2d.setColor(Color.GREEN);
        		g2d.drawString("Inspect Mode", 100, 55);
        		
        		g2d.setColor(Color.RED);
        		g2d.drawString("E:", 20, 70);
        		g2d.setColor(Color.GREEN);
        		g2d.drawString("Enter Wormhole", 100, 70);
        		
        		g2d.setColor(Color.RED);
        		g2d.drawString("Enter:", 20, 85);
        		g2d.setColor(Color.GREEN);
        		g2d.drawString("End Turn", 100, 85);
        		break;
        	}
        	case Game.GAMEMODEINSPECT:{
        		g2d.setColor(Color.RED);
        		g2d.drawString("Arrows:", 20, 40);
        		g2d.setColor(Color.GREEN);
        		g2d.drawString("Select Inspect Cell", 100, 40);
        		
        		g2d.setColor(Color.RED);
        		g2d.drawString("N:", 20, 55);
        		g2d.setColor(Color.GREEN);
        		g2d.drawString("Navigate Mode", 100, 55);
        		
        		g2d.setColor(Color.RED);
        		g2d.drawString("Enter:", 20, 70);
        		g2d.setColor(Color.GREEN);
        		g2d.drawString("End Turn", 100, 70);
        		break;
        	}
        }
    }
	
}